'use strict';
angular.module('services').factory('FormaterService', [
	        function() {
	        	
	        	var formatDate = function(dateStr){
	        		var date = new Date(dateStr);
	        		return pad(date.getDate()) + "/" + pad((date.getMonth()+1)) + "/" + date.getFullYear();
	        	};
	        	
	        	function pad(s) { return (s < 10) ? '0' + s : s; }
	        	
	        	return {
	        		getFormatDate : function(date){ return formatDate(date);}
	        	};
} ]);
